<!DOCTYPE html>  
<html xmlns:th="http://www.thymeleaf.org">  
<head>  
  <title>用户</title>  
  <meta charset="utf-8">  
  <meta name="viewport" content="width=device-width, initial-scale=1">  
  <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.2/css/bootstrap.min.css" rel="stylesheet">  
  <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.2/js/bootstrap.bundle.min.js"></script>  
</head>  
<body>  
  <div class="container mt-3">  
    <h2>功能列表</h2>  
    <p th:if="${session.LoginUser != null}" class="text-right welcome-text mb-3">  
        欢迎您，<span class="badge bg-primary" th:text="${session.LoginUser.username}"></span>  
    </p>  
    <div class="mb-3">  
      <a class="btn btn-primary" th:href="@{/article/page?pageIndex=0}">全部文章列表</a>  
    </div>  
    <div class="mb-3">  
      <a class="btn btn-secondary" th:href="@{/reply/page?pageIndex=0}">我的评论</a>  
    </div>  
	<div class="mb-3">  
	     <a class="btn btn-secondary" th:href="@{/picture/list}">我的图片</a>  
	</div>  
    <div class="mb-3">  
      <a class="btn btn-danger" th:href="@{/logout}">退出</a>  
    </div>  
  </div>  
  
  <div class="container mt-4">  
      <h2 th:text="${indexarticle.title}">文章标题</h2>  
      <p><strong>文章类型：</strong><span th:text="${indexarticle.articletype.type}">文章类型</span></p>  
      <div th:utext="${indexarticle.content}">文章内容</div>  
  	<form th:action="@{/reply/indexsave}" method="post">  
  	    <input type="hidden" name="articleId" th:value="${indexarticle.id}" />  
  	    <div class="mb-3">  
  	        <label for="content" class="form-label">评论内容：</label>  
  	        <textarea id="content" name="content" class="form-control" required></textarea>  
  	    </div>  
  	    <div class="mb-3">  
  	        <button type="submit" class="btn btn-primary">提交评论</button>  
  	    </div>  
  	</form>  
      <h3>评论列表</h3>  
      <ul class="list-group">  
          <li class="list-group-item" th:each="reply : ${indexreplies}">  
              <div><strong>评论内容：</strong><span th:text="${reply.content}">评论内容</span></div>  
              <div><strong>用户名称：</strong><span th:text="${reply.user.username}">用户名</span></div>  
              <div><strong>评论时间：</strong><span th:text="${#dates.format(reply.createTime, 'yyyy-MM-dd HH:mm:ss')}">评论时间</span></div>  
          </li>  
      </ul>  
  </div>  
</body>  
</html>